<template>
  <div>
    <h1 class="title">联名</h1>
    <editors :pid="1" class="editor-in-jointly"></editors>

    <div class="submit" @click="submitfn">提交</div>

  </div>
</template>

<script>
import editors from "../wangeditor";
export default {
  components: {
    editors,
  },
  methods: {
    
    submitfn() {
      let info = localStorage.getItem("info");
      let token = sessionStorage.getItem("token");
      let value = { token: token, info: info,id:2 };
      this.$http.post("/api/admin/aboutModify", value).then((res) => {
        //请求成功
        console.log(res)
        if(res.data.code==3000){
         this.$message({message:'身份失效请重新登录',type:'error'});
        }else if(res.data.code==2000){
         this.$message({message:'操作成功',type:'success'});
        }else if(res.data.code==2001){
           this.$message({message:'内容不能为空',type:'warning'});
        }
      });
    },
  },
};
</script>

<style scoped>
.submit {
  background: springgreen;
  color: white;
  width: fit-content;
  padding: 10px;
  /* margin-top: 20px; */
  border-radius: 6px;
  cursor: pointer;
  margin: 0 auto;
  /* margin-left: 30px; */
}
.submit:hover {
  opacity: 0.5;
}
.title {
  padding: 0;
  margin: 0;
  margin-top: 20px;
  text-align: center;
}
.editor.editor-in-jointly{
  width: 96%;
  margin-left: 2%;
  box-sizing: border-box;
}

</style>